<template>
  <div>
    <preview v-for="(item, index) in template_form" :key="index" :ele="item.ele" :obj="item.obj"></preview>
  </div>
</template>
<script>
export default {
  data() {
    return {
      template_form: []
    };
  },
  created() {
    // this.template_form = JSON.parse(
    //   localStorage.getItem("template_form") || "[]"
    // );
    this.$http
      .get("http://172.16.10.70:3000/from/find/5e09db9fa49898ce945e9e5f/Mongo")
      .then(result => {
        console.log(result.data);
        debugger;
        this.template_form = result.data.fromData;
      });
  }
};
</script>
